package edu.spec.wyn.week08.book.unit4.one;

public class Cylinder  extends Circle{
    private double hight;
    public Cylinder (double r, double h){
        super(r);
        this.hight=h;
    }
    public double getVolume(){
        double volume=getArea()*hight;
        return volume;
    }
    public void showVloume(){
        System.out.println("圆柱的体积是："+getVolume());
    }

    public static void main(String[] args) {
        Circle circle=new Circle(3);
        circle.show();
        Cylinder cylinder=new Cylinder(3,2);
        cylinder.showVloume();
    }
}
